\doxysection{C\+:/\+Users/\+ASUS/\+Desktop/dm-\/ctrl\+H7-\/balance-\/9025test/\+Drivers/\+STM32\+H7xx\+\_\+\+HAL\+\_\+\+Driver/\+Inc/stm32h7xx\+\_\+hal\+\_\+def.h File Reference}
\hypertarget{stm32h7xx__hal__def_8h}{}\label{stm32h7xx__hal__def_8h}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Drivers/STM32H7xx\_HAL\_Driver/Inc/stm32h7xx\_hal\_def.h@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Drivers/STM32H7xx\_HAL\_Driver/Inc/stm32h7xx\_hal\_def.h}}


This file contains HAL common defines, enumeration, macros and structures definitions.  


{\ttfamily \#include "{}stm32h7xx.\+h"{}}\newline
{\ttfamily \#include "{}Legacy/stm32\+\_\+hal\+\_\+legacy.\+h"{}}\newline
{\ttfamily \#include $<$stddef.\+h$>$}\newline
{\ttfamily \#include $<$math.\+h$>$}\newline
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{stm32h7xx__hal__def_8h_aad28bc64749c50dcedd6bf819fdc6974}\label{stm32h7xx__hal__def_8h_aad28bc64749c50dcedd6bf819fdc6974} 
\#define {\bfseries HAL\+\_\+\+MAX\+\_\+\+DELAY}~0x\+FFFFFFFFU
\item 
\#define \mbox{\hyperlink{stm32h7xx__hal__def_8h_a5b44dfd2a26f85f7b628b0945daff2c3}{HAL\+\_\+\+IS\+\_\+\+BIT\+\_\+\+SET}}(REG,  BIT)
\item 
\#define \mbox{\hyperlink{stm32h7xx__hal__def_8h_a82637a84fbdca0e2a25496089b549924}{HAL\+\_\+\+IS\+\_\+\+BIT\+\_\+\+CLR}}(REG,  BIT)
\item 
\#define \mbox{\hyperlink{stm32h7xx__hal__def_8h_af5b3b3d0eff8c4cb59d4d3909c247311}{\+\_\+\+\_\+\+HAL\+\_\+\+LINKDMA}}(\+\_\+\+\_\+\+HANDLE\+\_\+\+\_\+,  \+\_\+\+\_\+\+PPP\+\_\+\+DMA\+\_\+\+FIELD\+\_\+\+\_\+,  \+\_\+\+\_\+\+DMA\+\_\+\+HANDLE\+\_\+\+\_\+)
\item 
\#define \mbox{\hyperlink{stm32h7xx__hal__def_8h_a86d500a34c624c2cae56bc25a31b12f3}{UNUSED}}(x)
\item 
\#define \mbox{\hyperlink{stm32h7xx__hal__def_8h_a5850085e1bb7a96a417756f235b16aea}{\+\_\+\+\_\+\+HAL\+\_\+\+RESET\+\_\+\+HANDLE\+\_\+\+STATE}}(\+\_\+\+\_\+\+HANDLE\+\_\+\+\_\+)
\begin{DoxyCompactList}\small\item\em Reset the Handle\textquotesingle{}s State field. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{stm32h7xx__hal__def_8h_ad3d96e1b9022ba76b69eeda91027b36c}{\+\_\+\+\_\+\+HAL\+\_\+\+LOCK}}(\+\_\+\+\_\+\+HANDLE\+\_\+\+\_\+)
\item 
\#define \mbox{\hyperlink{stm32h7xx__hal__def_8h_a7c2c23627aed2bb71d8c1ad071cda004}{\+\_\+\+\_\+\+HAL\+\_\+\+UNLOCK}}(\+\_\+\+\_\+\+HANDLE\+\_\+\+\_\+)
\item 
\Hypertarget{stm32h7xx__hal__def_8h_aaa12b03c58e2eb296bd7aa915ee540f3}\label{stm32h7xx__hal__def_8h_aaa12b03c58e2eb296bd7aa915ee540f3} 
\#define {\bfseries \+\_\+\+\_\+\+ALIGN\+\_\+\+END}
\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f}\label{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f} 
enum \mbox{\hyperlink{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f}{HAL\+\_\+\+Status\+Type\+Def}} \{ {\bfseries HAL\+\_\+\+OK} = 0x00
, {\bfseries HAL\+\_\+\+ERROR} = 0x01
, {\bfseries HAL\+\_\+\+BUSY} = 0x02
, {\bfseries HAL\+\_\+\+TIMEOUT} = 0x03
 \}
\begin{DoxyCompactList}\small\item\em HAL Status structures definition. \end{DoxyCompactList}\item 
\Hypertarget{stm32h7xx__hal__def_8h_ab367482e943333a1299294eadaad284b}\label{stm32h7xx__hal__def_8h_ab367482e943333a1299294eadaad284b} 
enum \mbox{\hyperlink{stm32h7xx__hal__def_8h_ab367482e943333a1299294eadaad284b}{HAL\+\_\+\+Lock\+Type\+Def}} \{ {\bfseries HAL\+\_\+\+UNLOCKED} = 0x00
, {\bfseries HAL\+\_\+\+LOCKED} = 0x01
 \}
\begin{DoxyCompactList}\small\item\em HAL Lock structures definition. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This file contains HAL common defines, enumeration, macros and structures definitions. 

\begin{DoxyAuthor}{Author}
MCD Application Team 
\end{DoxyAuthor}
\begin{DoxyAttention}{Attention}

\end{DoxyAttention}
Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-\/\+IS. 

\label{doc-define-members}
\Hypertarget{stm32h7xx__hal__def_8h_doc-define-members}
\doxysubsection{Macro Definition Documentation}
\Hypertarget{stm32h7xx__hal__def_8h_af5b3b3d0eff8c4cb59d4d3909c247311}\index{stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}!\_\_HAL\_LINKDMA@{\_\_HAL\_LINKDMA}}
\index{\_\_HAL\_LINKDMA@{\_\_HAL\_LINKDMA}!stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}}
\doxysubsubsection{\texorpdfstring{\_\_HAL\_LINKDMA}{\_\_HAL\_LINKDMA}}
{\footnotesize\ttfamily \label{stm32h7xx__hal__def_8h_af5b3b3d0eff8c4cb59d4d3909c247311} 
\#define \+\_\+\+\_\+\+HAL\+\_\+\+LINKDMA(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+\+HANDLE\+\_\+\+\_\+}{, }\item[{}]{\+\_\+\+\_\+\+PPP\+\_\+\+DMA\+\_\+\+FIELD\+\_\+\+\_\+}{, }\item[{}]{\+\_\+\+\_\+\+DMA\+\_\+\+HANDLE\+\_\+\+\_\+}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{do}\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (\_\_HANDLE\_\_)-\/>\_\_PPP\_DMA\_FIELD\_\_\ =\ \&(\_\_DMA\_HANDLE\_\_);\ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (\_\_DMA\_HANDLE\_\_).Parent\ =\ (\_\_HANDLE\_\_);\ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{while}(0)}

\end{DoxyCode}
\Hypertarget{stm32h7xx__hal__def_8h_ad3d96e1b9022ba76b69eeda91027b36c}\index{stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}!\_\_HAL\_LOCK@{\_\_HAL\_LOCK}}
\index{\_\_HAL\_LOCK@{\_\_HAL\_LOCK}!stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}}
\doxysubsubsection{\texorpdfstring{\_\_HAL\_LOCK}{\_\_HAL\_LOCK}}
{\footnotesize\ttfamily \label{stm32h7xx__hal__def_8h_ad3d96e1b9022ba76b69eeda91027b36c} 
\#define \+\_\+\+\_\+\+HAL\+\_\+\+LOCK(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+\+HANDLE\+\_\+\+\_\+}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{do}\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if((\_\_HANDLE\_\_)-\/>Lock\ ==\ HAL\_LOCKED)\ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ HAL\_BUSY;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (\_\_HANDLE\_\_)-\/>Lock\ =\ HAL\_LOCKED;\ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\textcolor{keywordflow}{while}\ (0)}

\end{DoxyCode}
\Hypertarget{stm32h7xx__hal__def_8h_a5850085e1bb7a96a417756f235b16aea}\index{stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}!\_\_HAL\_RESET\_HANDLE\_STATE@{\_\_HAL\_RESET\_HANDLE\_STATE}}
\index{\_\_HAL\_RESET\_HANDLE\_STATE@{\_\_HAL\_RESET\_HANDLE\_STATE}!stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}}
\doxysubsubsection{\texorpdfstring{\_\_HAL\_RESET\_HANDLE\_STATE}{\_\_HAL\_RESET\_HANDLE\_STATE}}
{\footnotesize\ttfamily \label{stm32h7xx__hal__def_8h_a5850085e1bb7a96a417756f235b16aea} 
\#define \+\_\+\+\_\+\+HAL\+\_\+\+RESET\+\_\+\+HANDLE\+\_\+\+STATE(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+\+HANDLE\+\_\+\+\_\+}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{((\_\_HANDLE\_\_)-\/>State\ =\ 0)}

\end{DoxyCode}


Reset the Handle\textquotesingle{}s State field. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+\+\_\+\+HANDLE\+\_\+\+\_\+} & specifies the Peripheral Handle. \\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
This macro can be used for the following purpose\+:
\begin{DoxyItemize}
\item When the Handle is declared as local variable; before passing it as parameter to HAL\+\_\+\+PPP\+\_\+\+Init() for the first time, it is mandatory to use this macro to set to 0 the Handle\textquotesingle{}s "{}\+State"{} field. Otherwise, "{}\+State"{} field may have any random value and the first time the function HAL\+\_\+\+PPP\+\_\+\+Init() is called, the low level hardware initialization will be missed (i.\+e. HAL\+\_\+\+PPP\+\_\+\+Msp\+Init() will not be executed).
\item When there is a need to reconfigure the low level hardware\+: instead of calling HAL\+\_\+\+PPP\+\_\+\+De\+Init() then HAL\+\_\+\+PPP\+\_\+\+Init(), user can make a call to this macro then HAL\+\_\+\+PPP\+\_\+\+Init(). In this later function, when the Handle\textquotesingle{}s "{}\+State"{} field is set to 0, it will execute the function HAL\+\_\+\+PPP\+\_\+\+Msp\+Init() which will reconfigure the low level hardware. 
\end{DoxyItemize}
\end{DoxyNote}

\begin{DoxyRetVals}{Return values}
{\em None} & \\
\hline
\end{DoxyRetVals}
\Hypertarget{stm32h7xx__hal__def_8h_a7c2c23627aed2bb71d8c1ad071cda004}\index{stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}!\_\_HAL\_UNLOCK@{\_\_HAL\_UNLOCK}}
\index{\_\_HAL\_UNLOCK@{\_\_HAL\_UNLOCK}!stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}}
\doxysubsubsection{\texorpdfstring{\_\_HAL\_UNLOCK}{\_\_HAL\_UNLOCK}}
{\footnotesize\ttfamily \label{stm32h7xx__hal__def_8h_a7c2c23627aed2bb71d8c1ad071cda004} 
\#define \+\_\+\+\_\+\+HAL\+\_\+\+UNLOCK(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+\+HANDLE\+\_\+\+\_\+}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{do}\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (\_\_HANDLE\_\_)-\/>Lock\ =\ HAL\_UNLOCKED;\ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\textcolor{keywordflow}{while}\ (0)}

\end{DoxyCode}
\Hypertarget{stm32h7xx__hal__def_8h_a82637a84fbdca0e2a25496089b549924}\index{stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}!HAL\_IS\_BIT\_CLR@{HAL\_IS\_BIT\_CLR}}
\index{HAL\_IS\_BIT\_CLR@{HAL\_IS\_BIT\_CLR}!stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}}
\doxysubsubsection{\texorpdfstring{HAL\_IS\_BIT\_CLR}{HAL\_IS\_BIT\_CLR}}
{\footnotesize\ttfamily \label{stm32h7xx__hal__def_8h_a82637a84fbdca0e2a25496089b549924} 
\#define HAL\+\_\+\+IS\+\_\+\+BIT\+\_\+\+CLR(\begin{DoxyParamCaption}\item[{}]{REG}{, }\item[{}]{BIT}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{(((REG)\ \&\ (BIT))\ ==\ 0U)}

\end{DoxyCode}
\Hypertarget{stm32h7xx__hal__def_8h_a5b44dfd2a26f85f7b628b0945daff2c3}\index{stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}!HAL\_IS\_BIT\_SET@{HAL\_IS\_BIT\_SET}}
\index{HAL\_IS\_BIT\_SET@{HAL\_IS\_BIT\_SET}!stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}}
\doxysubsubsection{\texorpdfstring{HAL\_IS\_BIT\_SET}{HAL\_IS\_BIT\_SET}}
{\footnotesize\ttfamily \label{stm32h7xx__hal__def_8h_a5b44dfd2a26f85f7b628b0945daff2c3} 
\#define HAL\+\_\+\+IS\+\_\+\+BIT\+\_\+\+SET(\begin{DoxyParamCaption}\item[{}]{REG}{, }\item[{}]{BIT}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{(((REG)\ \&\ (BIT))\ ==\ (BIT))}

\end{DoxyCode}
\Hypertarget{stm32h7xx__hal__def_8h_a86d500a34c624c2cae56bc25a31b12f3}\index{stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}!UNUSED@{UNUSED}}
\index{UNUSED@{UNUSED}!stm32h7xx\_hal\_def.h@{stm32h7xx\_hal\_def.h}}
\doxysubsubsection{\texorpdfstring{UNUSED}{UNUSED}}
{\footnotesize\ttfamily \label{stm32h7xx__hal__def_8h_a86d500a34c624c2cae56bc25a31b12f3} 
\#define UNUSED(\begin{DoxyParamCaption}\item[{}]{x}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{((void)(x))\ \ \ \ \textcolor{comment}{/*\ To\ avoid\ gcc/g++\ warnings\ */}}

\end{DoxyCode}
